package cn.nullpointer95.fileprocess.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * 项目测试接口类
 *
 * @author NullPointer95
 * @version 0.1
 */
@RestController
@Api(tags = {"测试接口"})
public class HelloController {

    /**
     * 测试接口
     *
     * @param name 测试姓名
     * @return
     */
    @ApiOperation(value = "say hi~", notes = "根据输入姓名返回欢迎文字", httpMethod = "GET")
    @GetMapping("hello/{name}")
    public String helloApi(
            @ApiParam(required = true, value = "用户名称") @PathVariable("name") String name) {
        return String.format("Hello~ %s", name);
    }
}
